//
//  FWHttpUtil.h
//  BirdLoveSheep
//
//  Created by wwj on 16/3/9.
//  Copyright © 2016年 wwj. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>

@interface FWHttpUtil : NSObject

+ (instancetype)sharedHttpUtil;
+(void)cancelManager;

/**
 *  发送post请求
 *
 *  @param url    请求url
 *  @param params 请求参数
 */
+(NSURLSessionDataTask *)postWithURL:(NSString *)url params:(NSDictionary *)params success:(void(^)(id responseObject))success failure:(void(^)(NSError *failure))failure;

/**
 *  发送get请求
 *
 *  @param url    请求url
 *  @param params 请求参数
 */
+(NSURLSessionDataTask *)getWithURL:(NSString *)url params:(NSDictionary *)params success:(void(^)(id responseObject))success failure:(void(^)(NSError *failure))failure;
@end
